<extend name="Public/base"/>

<block name="body">
    <h3>网站设置</h3>

    <ul class="nav nav-tabs">
        <volist name="Think.config.CONFIG_GROUP_LIST" id="group">
            <li role="presentation"<eq name="id" value="$key"> class="active"</eq>><a href="{:U('?id='.$key)}">{$group}配置</a></li>
        </volist>
    </ul>
    <div class="panel-body panel panel-default">
        <div class="row">
            <div class="col-sm-12">
                <form action="{:U('save')}" method="post">
                    <volist name="list" id="config">
                        <div class="form-group">
                            <label class="control-label">{$config.title}<span class="check-tips">（{$config.remark}）</span> </label>
                            <div class="row">
                                <div class="col-sm-12">
                                    <switch name="config.type">
                                    <case value="0">
                                        <input type="text" class="form-control input-s-sm" name="config[{$config.name}]" value="{$config.value}">
                                    </case>
                                    <case value="1">
                                        <input type="text" class="form-control" name="config[{$config.name}]" value="{$config.value}">
                                    </case>
                                    <case value="2">
                                            <textarea name="config[{$config.name}]" class="form-control">{$config.value}</textarea>
                                    </case>
                                    <case value="3">
                                            <textarea name="config[{$config.name}]" class="form-control">{$config.value}</textarea>
                                    </case>
                                    <case value="4">
                                        <select name="config[{$config.name}]" class="form-control input-s-sm">
                                            <volist name=":parse_config_attr($config['extra'])" id="vo">
                                                <option value="{$key}" <eq name="config.value" value="$key">selected</eq>>{$vo}</option>
                                            </volist>
                                        </select>
                                    </case>
                                    </switch>
                                </div>
                            </div>
                        </div>
                    </volist>
                    <div class="form-group">
                        <label class="control-label"></label>
                        <div class="controls">
                            <empty name="list"><button type="submit" disabled class="btn btn-primary disabled" target-form="form-horizontal">确 定</button><else/><button type="submit" class="btn btn-primary ladda-button" target-form="form-horizontal">确 定</button></empty>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</block>

<block name="script">

</block>
